""" Original experimental data. Data remains unchanged, but was refactored in 10.2020 by Eric Deal. This should be considered the official dataset """
#%%
import numpy as np, json

series_data = {

        'gb_s1': {

            'e1': {
                'grain_kind': 'gb',
                'date': '23_05_17',
                'bed_slope': 29.5, # per mille
                'main_tank_water_temp': 21.0, # C
                'main_tank_water_depth': 32.7, # cm
                'pump_freq': 31.5, # Hz
                'pipe_grade': -33.0, # grade (angled up!)
                'dt_equil': [300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300], # s
                'bead_mass': [38.64,  39.94,  53.55,  46.73,  49.97, 57.06,  50.00,  50.75,  55.31,  52.09, 55.32,  54.97,  57.33,  47.44,  57.85, 55.14,  46.25,  66.02,  63.38,  47.51, 47.16,  49.14,  48.01,  49.96,  47.35, 41.89,  68.90,  49.76,  59.33,  54.34, 49.20,  45.62,  38.47,  42.83,  50.63, 52.72,  49.99,  51.61,  64.43,  59.53, 63.44,  68.15,  64.08,  60.69,  65.44, 42.54, 10.05], # grams
                'discharge_depth': [np.asarray([21.1, 21.2, 21.1, 21.2]).mean()], # cm
                'discharge_time': [13.24], # s
                'meas_dist_along_flume': [30.0, 55.0, 80.0, 160.0, 185.0, 210.0],
                'bed_h_range_equil': [7.85, 9.2, 9.4, 9.6, 9.6, 9.85], # cm (left to right)
                'water_h_range_equil': [20.05, 20.3, 20.2, 21.5, 21.95, 21.4], # cm (left to right)
                'equil_mass_inds': [10,-2],
                'slope_inds': [1, 5]
                },

            'e2': {
                'grain_kind': 'gb',
                'date': '21_05_17',
                'bed_slope': 29.5, # per mille
                'main_tank_water_temp': 21.0, # C
                'main_tank_water_depth': 33.3, # cm
                'pump_freq': 31.5, # Hz
                'pipe_grade': -15.0, # grade (angled up!)
                'dt_equil': [300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300], # s
                'bead_mass': [132.23, 214.94, 147.12, 243.61, 256.61, 224.16, 243.95, 236.79, 221.18, 257.79, 249.07, 266.95, 234.73, 249.40, 241.07, 256.78, 25.01], # grams
                'discharge_depth': [np.asarray([18.9, 19.0, 18.9, 18.9]).mean(), np.asarray([19.8, 19.9, 19.9, 19.8]).mean()], # cm
                'discharge_time': [11.84, 12.44], # s
                'meas_dist_along_flume': [30.0, 55.0, 80.0, 160.0, 185.0, 210.0],
                'bed_h_range_equil': [8.2, 9.8, 10.0, 10.3, 10.3, 10.35], # cm (left to right)
                'water_h_range_equil': [19.6, 20.2, 20.4, 22.0, 22.4, 22.2], # cm (left to right)
                'equil_mass_inds': [4, 16],
                'slope_inds': [2, 5]
                    },

            'e3': {
                'grain_kind': 'gb',
                'date': '19_05_17',
                'bed_slope': 30.0, # per mille
                'main_tank_water_temp': 20.5, # C
                'main_tank_water_depth': 32.3, # cm
                'pump_freq': 31.5, # Hz
                'pipe_grade': 13.0, # cm
                'dt_equil': [60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60], # s
                'bead_mass': [19.42,  18.44,  51.19,  99.02,  122.71, 142.48, 156.13, 160.80, 174.66, 176.66, 172.74, 180.10, 184.59, 187.20, 197.08, 1543.87, 329.59], # grams
                'discharge_depth': [np.asarray([19.5, 19.6, 19.5, 19.5]).mean(), np.asarray([20.0, 20.0, 20.0, 20.1]).mean()], # cm
                'discharge_time': [12.38, 12.59], # s
                'meas_dist_along_flume': [30.0, 55.0, 80.0, 160.0, 185.0, 210.0],
                'bed_h_range_equil': [9.6, 11.35, 12.2, 13.5, 14.0, 14.0], # cm (left to right)
                'water_h_range_equil': [19.05, 20.3, 21.3, 23.9, 24.6, 26.4], # cm (left to right)
                'equil_mass_inds': [8,-2],
                'slope_inds': [1, 5]
                },

            'e4': {
                'grain_kind': 'gb',
                'date': '19_05_17',
                'bed_slope': 29.5, # per mille
                'main_tank_water_temp': 20.5, # C
                'main_tank_water_depth': 32.3, # cm
                'pump_freq': 31.5, # Hz
                'pipe_grade': 52.0, # per mille
                'dt_equil': [60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60], # s
                'bead_mass': [1.14,   1.27,   59.71,  157.96, 240.27, 306.38, 333.83, 361.48, 393.95, 386.25, 413.46, 416.63, 398.48, 421.94, 1242.35], # grams
                'discharge_depth': np.nan, # cm
                'discharge_time': np.nan, # s
                'meas_dist_along_flume': [30.0, 55.0, 80.0, 160.0, 185.0, 210.0],
                'bed_h_range_equil': [10.6, 12.2, 13.3, 15.8, 16.9, 17.8], # cm (left to right)
                'water_h_range_equil': [19.0, 20.35, 21.6, 25.0, 26.3, 28.5], # cm (left to right)
                'equil_mass_inds': [11, 14],
                'slope_inds': [1, 5]
                },

            'e5': {
                'grain_kind': 'gb',
                'date': '19_05_17',
                'bed_slope': 30.0, # per mille
                'main_tank_water_temp': 21.0, # C
                'main_tank_water_depth': 32.5, # cm
                'pump_freq': 31.5, # Hz
                'pipe_grade': 129.5, # per mille
                'dt_equil': [60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60], # s
                'bead_mass': [3.08,   110.16, 447.30,  706.91, 864.12, 941.09, 1013.33, 1023.34, 1059.82, 1052.80, 1037.70, 1058.45, 991.91,  572.11, np.sum([444.93, 461.78, 608.87, 468.92])], # grams
                'discharge_depth': [np.asarray([19.4, 19.5, 19.5, 19.4]).mean()], # cm
                'discharge_time': [12.11], # s
                'meas_dist_along_flume': [30.0, 55.0, 80.0, 160.0, 185.0, 210.0],
                'bed_h_range_equil': [11.4, 13.7, 15.7, 20.5, 22.3, 24.9], # cm (left to right)
                'water_h_range_equil': [20.4, 21.0, 23.0, 29.7, 30.7, 33.7], # cm (left to right)
                'equil_mass_inds': [8, 12],
                'slope_inds': [1, 5]
                },

            'e6': {
                'grain_kind': 'gb',
                'date': '21_05_17',
                'bed_slope': 29.5, # per mille
                'main_tank_water_temp': 21.0, # C
                'main_tank_water_depth': 32.7, # cm
                'pump_freq': 31.5, # Hz
                'pipe_grade': 225.0, # per mille
                'dt_equil': [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], # s
                'bead_mass': [0,       0,       108.76,  442.82,  725.65, 942.33,  1099.61, 1182.68, 1162.38, 1168.58, 1218.22, 1238.90, 1275.76, 1258.61,  1280.32, 1270.09, 1282.46, 1191.00, np.sum([1195.85, 804.80, 1056.37, 898.54])], # grams
                'discharge_depth': [np.asarray([18.8, 18.8, 18.8, 18.8]).mean(), np.asarray([19.3, 19.3, 19.3, 19.4]).mean()], # cm
                'discharge_time': [11.52, 11.83], # s
                'meas_dist_along_flume': [30.0, 55.0, 80.0, 160.0, 185.0, 210.0],
                'bed_h_range_equil': [13.25, 15.95, 19.1, 26.0, 29.35, 32.75], # cm (left to right)
                'water_h_range_equil': [19.9, 22.1, 25.2, 33.4, 36.4, 40.2], # cm (left to right)
                'equil_mass_inds': [12,17],
                'slope_inds': [1, 5]
                }
            },
            
        'gb_s2': {

            'e1': {
                'grain_kind': 'gb',
                'date': '15_10_17',
                'bed_slope': 33.0,#29.5, # per mille
                'main_tank_water_temp': 20, # C
                'main_tank_water_depth': 34.3, # cm
                'pump_freq': 31.8, # Hz
                'pipe_grade': 22.0, # per mille
                'dt_equil': [120, 120, 120, 120, 120, 120, 120, 120, 120, 120], # s
                'bead_mass': [np.nan, np.nan, np.nan, 458.23, 438.68, np.nan, 439.66, np.nan, 457.86, np.nan], # grams
                'discharge_depth': [np.asarray([16.2, 16.2, 16.2, 16.2]).mean()], # cm
                'discharge_time': [9.93], # s
                'meas_dist_along_flume': [20, 50, 90, 150, 185, 220],
                'bed_h_range_equil': [9.8, 11.5, 13.2, 14.3, 13.8, np.nan], # cm (left to right)
                'water_h_range_equil': [19.0, 20.4, 22.2, 23.9, 24.9, np.nan], # cm (left to right)
                'equil_mass_inds': [0,10],
                'slope_inds': [1,5]
                },

            'e2': {
                'grain_kind': 'gb',
                'date': '15_10_17',
                'bed_slope': 33.0,#29.4, # per mille
                'main_tank_water_temp': 20, # C
                'main_tank_water_depth': 30.25, # cm
                'pump_freq': 31.8, # Hz
                'pipe_grade': 22.0, # per mille
                'dt_equil': [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 300, 300, 300, 300, 300], # s
                'bead_mass': [424.66, 401.60, 408.36, 412.18, 418.37, 395.43, 412.17, 416.93, 394.39, 404.51, 1050.86, 1032.17, 1033.32, 1041.31, 1073.56], # grams
                'discharge_depth': [np.asarray([17.4, 17.5, 17.5, 17.4]).mean()], # cm
                'discharge_time': [10.81], # s
                'meas_dist_along_flume': [20, 50, 90, 150, 185, 220],
                'bed_h_range_equil': [9.7, 11.4, 13.0, 14.2, 13.6, 11.1], # cm (left to right)
                'water_h_range_equil': [np.nan, 20.5, 22.0, 24.0, 24.8, 27.1], # cm (left to right)
                'equil_mass_inds': [0,15],
                'slope_inds': [1,5]
                },

            'e3': {
                'grain_kind': 'gb',
                'date': '16_10_17',
                'bed_slope': 33.0,#29.4, # per mille
                'main_tank_water_temp': 20, # C
                'main_tank_water_depth': 31.0, # cm
                'pump_freq': 31.8, # Hz
                'pipe_grade': 52.0, # per mille
                'dt_equil': [127, 113, 120, 120, 120, 120, 120, 120, 120, 120, 300, 300, 300, 300, 300], # s
                'bead_mass': [864.66, 750.80, 799.22, 810.29, 810.59,  799.12, 811.80, 816.42, 805.30, 827.89,  2056.33, 2066.69, 2029.33, 2055.18, 1997.27], # grams
                'discharge_depth': [np.asarray([20.7, 20.8, 20.8, 20.8]).mean()], # cm
                'discharge_time': [13.16], # s
                'meas_dist_along_flume': [20, 55, 90, 150, 185, 220],
                'bed_h_range_equil': [10.2, 12.5, 14.8, 17.0, 17.5, 18.4], # cm (left to right)
                'water_h_range_equil': [19.2, 20.7, 23.0, 25.6, 26.8, 30.0], # cm (left to right)
                'equil_mass_inds': [0,15],
                'slope_inds': [1,5]
                },

            'e4': {
                'grain_kind': 'gb',
                'date': '16_10_17',
                'bed_slope': 33.0,#29.4, # per mille
                'main_tank_water_temp': 20, # C
                'main_tank_water_depth': 32.9, # cm
                'pump_freq': 31.8, # Hz
                'pipe_grade': 130.5, # per mille
                'e_start_time': '17:52:30', # time
                'e_end_time': [], # time
                'dt_equil': [90, 90, 90, 90, 90, 90, 90, 90, 90, 90,  90, 90, 90, 90, 90,  90, 90, 90, 90, 90,  90, 90, 180], # s
                'bead_mass': [1642.51, 1504.46, 1548.43, 1502.38, 1511.57,  1543.48, 1412.19, 1474.66, 1454.54, 1475.22,  1414.58, 1393.18, 1430.88, 1482.60, 1476.93,  1331.05, 1236.02, 1187.49, 1116.95, np.nan,  np.nan, 1067.82, (980.32 + 1060.49)], # grams
                'discharge_depth': [np.asarray([22.0, 22.0, 21.9, 21.9]).mean()], # cm
                'discharge_time': [13.45], # s
                'meas_dist_along_flume': [20, 55, 90, 150, 185, 220],
                'bed_h_range_equil': [11.0, 13.2, 15.9, 19.3, 20.1, 20.5], # cm (left to right)
                'water_h_range_equil': [19.7, 21.2, 23.5, 26.8, 28.8, 32.9], # cm (left to right)
                'equil_mass_inds': [0,23],
                'slope_inds': [1,5]
                },

            'e5': {
                'grain_kind': 'gb',
                'date': '18_10_17',
                'bed_slope': 33.0,#29.5, # per mille
                'main_tank_water_temp': 19, # C
                'main_tank_water_depth': 32.8, # cm
                'pump_freq': 31.8, # Hz
                'pipe_grade': 5.3, # per mille
                'e_start_time': '12:43:30', # time
                'e_end_time': '', # time
                'dt_equil': [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 300, 300, 300, 300, 300, 300], # s
                'bead_mass': [285.05, 304.31, 299.13, 276.10, 292.57, 285.40, 304.22, 267.68, 293.44, 298.07, 711.82, 726.46, 695.86, 691.66, 667.16, 675.32], # grams Accuracy is plus minues half a gram
                'discharge_depth': [np.asarray([20.6, 20.7, 20.7, 20.7]).mean()], # cm
                'discharge_time': [12.86], # s
                'meas_dist_along_flume': [20, 55, 90, 150, 185, 220],
                'bed_h_range_equil': [9.2, 10.8, 12.1, 13.0, 12.0, 12.0], # cm (left to right)
                'water_h_range_equil': [19.0, 20.1, 21.6, 22.6, 23.4, 25.6],
                'equil_mass_inds': [0,16],
                'slope_inds': [1,5]
                },

            'e6': {
                'grain_kind': 'gb',
                'date': '18_10_17',
                'bed_slope': 33.0,#29.4, # per mille
                'main_tank_water_temp': 19, # C
                'main_tank_water_depth': 32.8, # cm
                'pump_freq': 31.8, # Hz
                'pipe_grade': 200.0, # grade
                'e_start_time': '14:43:00', # time
                'e_end_time': '', # time
                'dt_equil': [45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45], # s
                'bead_mass': [1508.39, 1396.53, 1279.31, 1229.18, 1129.21, 1110.92, 1077.77, 1069.17, 1029.51, 1028.99, 1047.81, 1065.61, 1197.46, 1360.87, 1465.46, 1574.60, 1623.46, 1647.49, 1688.62, 1659.69, 1514.98, 1521.87, 1539.52, 1442.20, 1317.63, 1273.97, 1347.61, 1423.76, 1479.87], # grams
                'discharge_depth': [np.asarray([20.6, 20.7, 20.7, 20.7]).mean()], # cm
                'discharge_time': [12.86], # s
                'meas_dist_along_flume': [20, 55, 90, 150, 185, 220],
                'bed_h_range_equil': [11.8, 16.0, 19.8, 25.0, 28.1, 32.5], # cm (left to right)
                'water_h_range_equil': [19.1, 22.6, 26.0, 31.1, 34.9, 41.5], # cm (left to right)
                'equil_mass_inds': [0,29],
                'slope_inds': [1,5]
                }
            },         
      
        'gb_s3': {

            'e1': {
                'exp_name': 's3e1',
                'grain_kind': 'gb',
                'date': '28_09_2018',
                'bed_slope': 35.4, # per mille
                'main_tank_water_temp': np.nan, # C
                'main_tank_water_depth': np.nan, # cm
                'pump_freq': 31.5, # Hz
                'pipe_grade': np.nan,
                'camera_pos': [204.28, 800.0], # mm
                'dt_equil': [180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180], # s
                'bead_mass': [782.62, 774.32, 766.18, 814.29, 790.73, 784.64, 802.92, 802.63, 834.22, 804.23, 776.44, 759.23, 771.13, 805.87, 822.39, 800.15], # grams
                'discharge_depth': [np.asarray([16.9, 17.0, 16.9, 17.0]).mean()], # cm
                'discharge_time': [9.53], # s
                'meas_dist_along_flume': [np.nan],
                'bed_h_range_equil': [np.nan], # cm (left to right)
                'water_h_range_equil': [np.nan], # cm (left to right)
                'equil_mass_inds': [0, 15],
                'slope_inds': [1,5]
                },

            'e2': {
                'exp_name': 's3e2',
                'grain_kind': 'gb',
                'date': '01_10_2018',
                'bed_slope': 35.4, # per mille
                'main_tank_water_temp': np.nan, # C
                'main_tank_water_depth': 36.3, # cm
                'pump_freq': 31.5, # Hz
                'pipe_grade': np.nan,
                'camera_pos': [196.15, 796.53], # mm
                'dt_equil': [600,  600, 600, 600,  600, 1200, 600, 600, 1200, 600], # s
                'bead_mass': [366.96, 344.69, 358.65, 323.40, 346.06, 665.61, 332.30, 297.46, 692.24, 342.05], # grams
                'discharge_depth': [np.asarray([np.nan]).mean()], # cm
                'discharge_time': [np.nan], # s
                'meas_dist_along_flume': [np.nan],
                'bed_h_range_equil': [np.nan], # cm (left to right)
                'water_h_range_equil': [np.nan], # cm (left to right)
                'equil_mass_inds': [0, 10],
                'slope_inds': [1,5]
                },

            'e3': {
                'exp_name': 's3e3',
                'grain_kind': 'gb',
                'date': '02_10_2018',
                'bed_slope': 35.4, # per mille
                'main_tank_water_temp': np.nan, # C
                'main_tank_water_depth': 36.3, # cm
                'pump_freq': 31.5, # Hz
                'pipe_grade': np.nan,
                'camera_pos': [194.27, 794.45], # mm
                'dt_equil': [900, 900, 900, 925, 880, 895, 900, 900, 900, 900], # s
                'bead_mass': [363.29, 407.54, 367.29, 379.92, 350.31, 367.24, 379.97, 382.22, 379.66, 346.31], # grams
                'discharge_depth': [np.asarray([19.0, 19.0, 19.0, 18.9]).mean()], # cm
                'discharge_time': [11.33], # s
                'meas_dist_along_flume': [np.nan],
                'bed_h_range_equil': [np.nan], # cm (left to right)
                'water_h_range_equil': [np.nan], # cm (left to right)
                'equil_mass_inds': [0, 10],
                'slope_inds': [1,5]
                },

            'e4': {
                'exp_name': 's3e4',
                'grain_kind': 'gb',
                'date': '03_10_2018',
                'bed_slope': 35.4, # per mille
                'main_tank_water_temp': np.nan, # C
                'main_tank_water_depth': np.nan, # cm
                'pump_freq': 31.5, # Hz
                'pipe_grade': np.nan,
                'camera_pos': [194.27, 736.33], # mm
                'dt_equil': [900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900], # s
                'bead_mass': [147.92, 132.12, 150.67, 147.00, 107.85, 117.31, 107.13, 119.27, 106.90, 113.34, 106.23, 113.80, 110.98, 119.82], # grams
                'discharge_depth': [np.asarray([np.nan]).mean()], # cm
                'discharge_time': [np.nan], # s
                'meas_dist_along_flume': [np.nan],
                'bed_h_range_equil': [np.nan], # cm (left to right)
                'water_h_range_equil': [np.nan], # cm (left to right)
                'equil_mass_inds': [0, 15],
                'slope_inds': [1,5]
                },

            'e5': {
                'exp_name': 's3e5',
                'grain_kind': 'gb',
                'date': '15_10_2018',
                'bed_slope': 35.4, # per mille
                'main_tank_water_temp': np.nan, # C
                'main_tank_water_depth': 31.6, # cm
                'pipe_slope': -16.5,
                'pump_freq': 31.5, # Hz
                'pipe_grade': np.nan,
                'cameras_pos': [200.0, np.nan],
                'piv_pos': [1417.86, 800.0],
                'dt_equil': [600, 600, 600, 600, 600, 600, 600, 600, 600], # s
                'bead_mass': [989.10, 981.15, 998.92, 962.33, 976.63, 997.28, 996.01, 990.43, 993.01], # grams
                'discharge_depth': [np.asarray([18.9, 18.9, 18.9, 19.0]).mean()], # cm
                'discharge_time': [11.99], # s
                'meas_dist_along_flume': [np.nan],
                'bed_h_range_equil': [np.nan], # cm (left to right)
                'water_h_range_equil': [np.nan], # cm (left to right)
                'equil_mass_inds': [0,9],
                'slope_inds': [1,5],
                'feed_mass_flux': [43.79, 41.90],
                'feed_time': [30.0, 30.0],
                'ldv_y_pos': [1010.0, 670.0, 690.0, 720.0, 750.0, 800.0, 900.0, 800.0],
                'ldv_x_pos': [540.0, 535.0, 535.0, 535.0, 535.0, 535.0, 539.0, 539.0],
                'notes': 'Problems with manta cam, the footage is only good for measuring bed and water slope, not mass flux. Also fps is approx 65.'
                },

            'e6': {
                'exp_name': 's3e6',
                'grain_kind': 'gb',
                'date': '16_10_2018',
                'bed_slope': 35.4, # per mille
                'main_tank_water_temp': np.nan, # C
                'main_tank_water_depth': 34.3, # cm
                'pump_freq': 31.5, # Hz
                'pipe_grade': np.nan,
                'discharge_depth': [np.asarray([17.6, 17.6, 17.6, 17.6]).mean()], # cm
                'discharge_time': [10.57], # s
                'feed_mass_flux': [11.68, 14.23, 13.63, 14.52, 17.15, 9.73], # g
                'feed_time': [30.0, 30.0, 30.0, 30.0, 30.0, 30.0], # s
                'cameras_pos': [200.00, 613.12], # z, y (mm*4)
                'piv_pos': [1417.86, 734.81], # z, y (mm*4)
                'ldv_z_pos': [577.0, 577.0, 577.0, 577.0, 577.0, 577.0], # (mm*4)
                'ldv_y_pos': [950.0, 800.0, 720.0, 670.0, 635.0, 615.0], # (mm*4)
                'dt_equil': [600, 600, 600, 600, 600, 600, 600, 600], # s
                'bead_mass': [383.59, 380.32, 391.81, 429.80, 425.41, 403.81, 408.60, 419.68], # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0], # cm (left to right)
                'bed_h_range_equil': [8.6, 9.8, 11.0, 11.1 ,11.5, 11.5], # cm (left to right)
                'water_h_range_equil': [19.0, 20.8, 21.2, 21.5, 22.5, np.nan], # cm (left to right)
                'equil_mass_inds': [0,8],
                'slope_inds': [1,5],
                'notes': 'Mass measurements started at box 10'
                },

            'e7': {
                'exp_name': 's3e7',
                'grain_kind': 'gb',
                'date': '17_10_2018',
                'bed_slope': 35.4, # per mille
                'main_tank_water_temp': np.nan, # C
                'main_tank_water_depth': 34.5, # cm
                'pump_freq': 31.5, # Hz
                'pipe_grade': -9.8, # per mille
                'discharge_depth': [np.asarray([19.4, 19.5, 19.5, 19.5]).mean()], # cm
                'discharge_time': [11.85], # s
                'feed_mass_flux': [55.41, 56.60, 58.47, 58.14], # g
                'feed_time': [60.0, 60.0, 60.0, 60.0], # s
                'cameras_pos': [200.0, np.nan], # z, y (mm*4)
                'piv_pos': [1417.86, np.nan], # z, y (mm*4)
                'ldv_y_pos': [960.0, 774.0, 692.0, 657.0, 650.0, 642.0, 635.0, 630.0], # (mm*4)
                'ldv_z_pos': [577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0], # (mm*4)
                'dt_equil': [915, 885, 900, 900, 900, 900, 900, 900, 900, 900], # s
                'bead_mass': [831.49, 842.23, 855.44, 854.37, 815.35, 874.95, 857.14, 831.37, 855.81, 843.01], # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [8.6, 9.7, 11.0, 11.5, 11.7, 12.4], # cm (left to right)
                'water_h_range_equil': [18.9, 20.4, 21.2, 21.3, 22.7, 23.5], # cm (left to right)
                'equil_mass_inds': [0, 10],
                'slope_inds': [1, 5],
                'notes': 'top of flow at around 1040 mm for ldv'
                },

            'e8': {
                'exp_name': 's3e8',
                'grain_kind': 'gb',
                'date': '18_10_2018',
                'bed_slope': 35.4, # per mille
                'main_tank_water_temp': np.nan, # C
                'main_tank_water_depth': 33.2, # cm
                'pump_freq': 31.5, # Hz
                'pipe_grade': 5.4, # per mille
                'discharge_depth': [np.asarray([17.8, 17.8, 17.9, 18.0]).mean()], # cm
                'discharge_time': [10.97], # s
                'feed_mass_flux': [112.01, 111.38, 111.70, 109.26], # g
                'feed_time': [60.0, 60.0, 60.0, 60.0], # s
                'cameras_pos': [200.0, 696.03], # z, y (mm*4)
                'piv_pos': [1423.00, 763.81], # z, y (mm*4)
                'ldv_y_pos': [577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0], # (mm*4)
                'ldv_z_pos': [1030.0, 950.0, 867.0, 783.0, 738.0, 715.0, 703.0, 696.0, 693.0, 690.0], # (mm*4)
                'dt_equil': [600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600], # s
                'bead_mass': [1192.63, 1190.97, np.nan, 1205.98, 1160.09, 1206.27, 1217.54, 1209.75, 1240.81, np.nan, 1225.67], # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [9.0, 10.8, 12.2, 13.0, 13.7, 15.0], # cm (left to right)
                'water_h_range_equil': [18.2, 20.2, 21.2, 22.0, 23.5, 24.7], # cm (left to right)
                'equil_mass_inds': [0, 11],
                'slope_inds': [1, 5],
                'notes': '''Missed box 3 completely - time was approx 10 mins.
                Also missed box 20 completely. It emptied itself into the basin.
                But the timing was not messed with at all, net box continued as planned.
                Manta footage died at around 240000, restarted computer and took more frames but it didnt help.
                I will have to fix the video, removing dropped frame portions'''
                },

            'e9': {
                'exp_name': 's3e9',
                'grain_kind': 'gb',
                'date': '18_10_2018',
                'bed_slope': 35.4, # per mille
                'main_tank_water_temp': np.nan, # C
                'main_tank_water_depth': 32.7, # cm
                'pump_freq': 31.5, # Hz
                'pipe_grade': 13.4, # per mille
                'discharge_depth': [np.asarray([17.8, 17.8, 17.9, 18.0]).mean()], # cm
                'discharge_time': [10.97], # s
                'feed_mass_flux': [154.16, 157.31, 150.56, 153.86], # g
                'feed_time': [60.0, 60.0, 60.0, 60.0], # s
                'cameras_pos': [200.0, 717.76], # z, y (mm*4)
                'piv_pos': [1423.0, 753.81], # z, y (mm*4)
                'ldv_y_pos': [1000.0, 874.0, 811.0, 779.0, 768.0, 760.0, 755.0, 751.0, 748.0], # (mm*4)
                'ldv_z_pos': [577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0], # (mm*4)
                'dt_equil': [300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300], # s
                'bead_mass': [766.46, 764.33, 767.49, 765.14, 786.52, 808.97, 786.30, 833.97, 846.49, 885.71, 885.78, 882.80, 875.53, 899.30, 873.30], # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [9.3, 10.7, 12.5, 13.8, 14.5, 15.6], # cm (left to right)
                'water_h_range_equil': [18.1, 20.1, 21.5, 22.7, 24.1, 25.5], # cm (left to right)
                'equil_mass_inds': [0, 15],
                'slope_inds': [1,5],
                'notes': '''starting ldv 80 arm mm from top of flow'''
                },

            'e10': {
                'exp_name': 's3e10',
                'grain_kind': 'gb',
                'date': '19_10_2018',
                'bed_slope': 35.4, # per mille
                'main_tank_water_temp': np.nan, # C
                'main_tank_water_depth': 32.6, # cm
                'pump_freq': 31.5, # Hz
                'pipe_grade': 22.5, # per mille
                'discharge_depth': [np.asarray([19.6, 19.7, 19.6, 19.6]).mean()], # cm
                'discharge_time': [12.22], # s
                'feed_mass_flux': [208.83, 211.64, 203.62, 208.88], # g
                'feed_time': [60.0, 60.0, 60.0, 60.0], # s
                'cameras_pos': [200.0, 767.87], # z, y (mm*4)
                'piv_pos': [1423.0, 808.73], # z, y (mm*4)
                'ldv_y_pos': [1005.0, 899.0, 839.0, 804.0, 784.0, 772.0, 766.0, 762.0, 760.0, 757.0], # (mm*4)
                'ldv_z_pos': [577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0], # (mm*4)
                'dt_equil': [300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300], # s
                # 'bead_mass': [1088.46, 1049.08, 1072.40, 1073.33, 1085.16, 1054.74, 1051.08, 1054.56, 1032.47, 1052.46, 1045.40, 1024.96, 1057.80, 1948.31, 1016.98, 1018.33, 1001.21, 1007.54], # grams
                'bead_mass': [1088.46, 1049.08, 1072.40, 1073.33, 1085.16, 1054.74, 1051.08, 1054.56, 1032.47, 1152.46, 1145.40, 1124.96, 1157.80, 1948.31, 1116.98, 1118.33, 1101.21, 1107.54], # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [9.5, 11.1, 13.3, 14.5, 15.6, 17.2], # cm (left to right)
                'water_h_range_equil': [18.0, 20.1, 22.1, 23.0, 24.8, 26.8], # cm (left to right)
                'equil_mass_inds': [0, 18],
                'slope_inds': [1,5],
                'notes': 'box 12 is first piv box'
                },

            'e11': {
                'exp_name': 's3e11',
                'grain_kind': 'gb',
                'date': '19_10_2018',
                'bed_slope': 35.4, # per mille
                'main_tank_water_temp': np.nan, # C
                'main_tank_water_depth': 32.6, # cm
                'pump_freq': 31.5, # Hz
                'pipe_grade': 174, # per mille
                'discharge_depth': [np.asarray([17.2, 17.3, 17.3, 17.4]).mean()], # cm
                'discharge_time': [10.23], # s
                'feed_mass_flux': [1354.88, 1358.54, 1340.29, 1364.77], # g
                'feed_time': [60.0, 60.0, 60.0, 60.0], # s
                'cameras_pos': [200.0, 960.38], # z, y (mm*4)
                'piv_pos': [1423.0, 1021.38], # z, y (mm*4)
                'ldv_y_pos': [1111.23, 1123.02, 1147.23, 1168.33, 1190.11, 1219.00, 1249.20, 1301.31], # (mm*4)
                'ldv_z_pos': [577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0], # (mm*4)
                'dt_equil': [50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50], # s
                'bead_mass': [1031.85, 1038.63, 1047.60, 1055.40, 1061.98, 1056.77, 1080.46, 1065.23, 1083.72, 1074.49, 1069.69, 1068.65, 1063.70, 1109.29, 1092.51, 1110.52, 1147.97, 1133.14, 1137.32, 1168.30, 1129.05, 1134.54, 1124.95, 1147.30, 1140.98], # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [10.6, 13.8, 18.4, 21.8, 25.6, np.nan], # cm (left to right)
                'water_h_range_equil': [17.8, 20.8, 25.1, 28.5, 33.0, np.nan], # cm (left to right)
                'equil_mass_inds': [0, 25],
                'slope_inds': [1,5],
                'notes': '''Moved manta camera near beginning of filming, moved again in the middle
                Boxes used for mass flux:  19-37 (metal) THEN 1-15 + blank (wooden)
                Y  =
                1 - 1111.23 mm
                    (only about 2500 samples)
                    Bottom of mobile bed
                2 - 1123.02 mm
                    Middle of mobile bed
                3 - 1147.23 mm
                    Close to top of mobile bed
                4 - 1168.33 mm
                    Software coincidence turned off!
                5 - 1190.11 mm
                    Back to having software coincidence
                6 - 1219.00 mm
                7 - 1249.20 mm
                    (only about ? samples)
                8 - 1301.31 mm
                    Started going past 300K in channel 2  (so filtered out)'''
                },

            'e12': {
                'exp_name': 's3e12',
                'grain_kind': 'gb',
                'date': '20_10_2018',
                'bed_slope': 35.4, # per mille
                'main_tank_water_temp': np.nan, # C
                'main_tank_water_depth': 32.1, # cm
                'pump_freq': 31.5, # Hz
                'pipe_grade': 59.0, # per mille
                'discharge_depth': [np.asarray([18.6, 18.5, 18.7, 18.6]).mean()], # cm
                'discharge_time': [11.58], # s
                'feed_mass_flux': [357.57,362.38,359.15,359.52], # g
                'feed_time': [60.0, 60.0, 60.0, 60.0], # s
                'cameras_pos': [200.0, 808.10], # z, y (mm*4) moved up to 858.20
                'piv_pos': [1423.0, 851.50], # z, y (mm*4)
                'ldv_y_pos': [1081.0, 976.0, 919.0, 888.0, 871.0, 862.0, 857.0, 854.0, 851.5], # (mm*4)
                'ldv_z_pos': [577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0], # (mm*4)
                'dt_equil': [180, 180, 180, 180, 180, 180, 180, 180, 180, 180], # s
                'bead_mass': [1196.73, 1245.12, 1208.90, 1221.83, 1215.21, 1233.23, 1228.50, 1225.90, 1205.17, 1208.77], # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [9.7, 12.0, 14.7, 16.3, 18.0, np.nan], # cm (left to right)
                'water_h_range_equil': [17.7, 20.4, 22.6, 24.9, 22.1, np.nan], # cm (left to right)
                'equil_mass_inds': [0, 10],
                'slope_inds': [1,4],
                'notes': 'Moved arm up in middle of manta footage.'
                },

            'e13': {
                'exp_name': 's3e13',
                'grain_kind': 'gb',
                'date': '20_10_2018',
                'bed_slope': 35.4, # per mille
                'main_tank_water_temp': np.nan, # C
                'main_tank_water_depth': 32.1, # cm
                'pump_freq': 31.5, # Hz
                'pipe_grade': 100.0, # per mille
                'discharge_depth': [np.asarray([18.7, 18.7, 18.7, 18.7]).mean()], # cm
                'discharge_time': [11.96], # s
                'feed_mass_flux': [302.42, 293.48, 297.06, 297.53], # g
                'feed_time': [30.0, 30.0, 30.0, 30.0], # s
                'cameras_pos': [200.0, 877.22], # z, y (mm*4)
                'piv_pos': [1423.0, 874.42], # z, y (mm*4)
                'ldv_y_pos': [1145.0, 1047.0, 994.0, 965.0, 948.0, 939.0, 935.0, 932.0, 929.0], # (mm*4)
                'ldv_z_pos': [577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0], # (mm*4)
                'dt_equil': [120, 120, 120, 120, 120, 120, 120, 120, 120, 120], # s
                'bead_mass': [1098.49, 1163.12, 1219.50, 1265.88, 1372.32, 1375.98, 1329.51, 1229.67, 1220.51, 1149.68], # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [10.2, 12.5, 15.8, 18.1, 20.6, np.nan], # cm (left to right)
                'water_h_range_equil': [17.6, 20.3, 23.2, 25.7, 29.1, np.nan], # cm (left to right)
                'equil_mass_inds': [0, 10],
                'slope_inds': [1,5],
                'notes': ''
                },
            },

        'ng_s1': {

            'e1': {
                'date': '23_05_17',
                'grain_kind': 'ng',
                'bed_slope': 29.5, # per mille
                'main_tank_water_temp': 22.0, # C
                'main_tank_water_depth': 33.6, # cm
                'camera_x_slope': 2.51, # percent
                'pump_freq': 31.5, # Hz
                'pipe_grade': 0.0, # per mille
                'dt_equil': [300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300], # s
                'bead_mass': [86.75,  123.76, 158.44, 173.07, 162.77, 202.42, 229.39, 221.45, 204.79, 204.86,  192.76, 217.69, 231.79, 268.26, 260.95, 33.19, np.nan], # 8.2
                'discharge_depth': [np.asarray([19.0, 19.0, 19.0, 19.0]).mean()], # cm
                'discharge_time': [11.76], # s
                'meas_dist_along_flume': [30.0, 55.0, 80.0, 160.0, 185.0, 210.0],
                'bed_h_range_equil': [8.8, 10.8, 11.1, 11.7, 11.4, 12.3], # cm (left to right)
                'water_h_range_equil': [19.5, 20.6, 20.5, 22.4, 22.4, 23.6], # cm (left to right)
                'equil_mass_inds': [5, 13],
                'slope_inds': [0, 3]
                },

            'e2': {
                'date': '22_05_17',
                'grain_kind': 'ng',
                'bed_slope': 29.5, # per mille
                'main_tank_water_temp': 20.5, # C
                'main_tank_water_depth': 34.8, # cm
                'pump_freq': 31.5, # Hz
                'pipe_grade': 82.0, # per mille
                'dt_equil': [60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60], # s
                'bead_mass': [1.13,   2.83,   12.50,  28.06 , 45.30, 75.17,  83.03,  102.15, 105.97, 140.52, 137.87, 136.77, 164.03, 160.16, 185.76, 144.38, 165.82, 173.03, 174.26, 172.75, 173.30, 170.15, 189.72, 183.57, 192.65, 175.23, 195.57, 188.15, 182.53, 182.21, 194.89, 178.30, 189.27, 182.79, 193.24, 183.29, 197.57, 851.50],
                'discharge_depth': [np.asarray([19.3, 19.3, 19.4, 19.4]).mean(), np.asarray([19.2, 19.2, 19.3, 19.2]).mean()], # cm
                'discharge_time': [11.74, 11.58], # s
                'meas_dist_along_flume': [30.0, 55.0, 80.0, 160.0, 185.0, 210.0],
                'bed_h_range_equil': [10.5, 11.0, 13.6, 16.1, 15.5, 15.3], # cm (left to right)
                'water_h_range_equil': [19.7, 20.3, 22.2, 24.7, 25.9, 28.1], # cm (left to right)
                'equil_mass_inds': [22, 37],
                'slope_inds': [1, 5]
                },

            'e3': {
                'date': '22_05_17',
                'grain_kind': 'ng',
                'bed_slope': 29.5, # per mille
                'main_tank_water_temp': 20.0, # C
                'main_tank_water_depth': 33.8, # cm
                'camera_x_slope': 2.91, # percent
                'pump_freq': 31.5, # Hz
                'pipe_grade': 201.0, # per mille
                'dt_equil': [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120], # s
                'bead_mass': [36.49,  211.89, 439.78, 613.01, 710.04, 872.07, 735.92, 876.56, 877.97, 899.65, 905.95],
                'discharge_depth': [np.asarray([20.1, 20.0, 20.1, 20.0]).mean()], # cm
                'discharge_time': [11.71], # s
                'meas_dist_along_flume': [30.0, 55.0, 80.0, 160.0, 185.0, 210.0],
                'bed_h_range_equil': [11.7, 14.0, 16.1, 19.8, 21.8, 22.6], # cm (left to right)
                'water_h_range_equil': [20.0, 21.3, 23.2, 27.8, 29.0, 33.1], # cm (left to right)
                'equil_mass_inds': [7, 11],
                'slope_inds': [1, 5]
                },

            'e4': {
                'date': '23_05_17',
                'grain_kind': 'ng',
                'bed_slope': 29.5, # per mille
                'main_tank_water_temp': 22.0, # C
                'main_tank_water_depth': 34.0, # cm
                'camera_x_slope': 2.85, # percent
                'pump_freq': 31.5, # Hz
                'pipe_grade': 350.0, # per mille
                'dt_equil': [60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60], # s
                'bead_mass': [1.67,   8.98,   84.34,  339.89, 495.87, 616.03, 696.31, 868.76, 827.67, 889.13, 908.01, 938.31, 940.96, 962.79, 881.31, 711.61, 563.82, 415.82, 354.61, 263.11, 232.27, 202.58, 1054.29], # 8.2
                'discharge_depth': [np.asarray([18.3, 18.3, 18.3, 18.3]).mean()], # cm
                'discharge_time': [10.98], # s
                'meas_dist_along_flume': [30.0, 55.0, 80.0, 160.0, 185.0, 210.0],
                'bed_h_range_equil': [14.2, 16.0, 19.3, 24.9, 26.4, 30.8], # cm (left to right)
                'water_h_range_equil': [20.0, 22.7, 25.6, 31.6, 34.1, 39.4], # cm (left to right)
                'equil_mass_inds': [11, 14],
                'slope_inds': [1, 5]
                }
            },

        'ng_s2': {

            'e3': { #Santi changed e1 to e3 on Feb 17, 2020
                'grain_kind': 'ng',
                'date': '21_10_17',
                'bed_slope': 33.0,#29.1, # per mille
                'main_tank_water_temp': 19, # C
                'main_tank_water_depth': 31.6, # cm
                'pump_freq': 31.8, # Hz
                'pipe_grade': 93.7, # grade
                'e_start_time': '15:46:00', # time
                'PIV_start_time': '16:04:00', # time started at the end of box 6
                'e_end_time': '', # time
                'dt_equil': [180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 360, 360], # s
                'bead_mass': [462.40, 471.75, 486.20, 495.81, 492.56, 515.81, 524.72, 477.37, 495.92, 520.27, 998.16, 1026.19], # grams
                'discharge_depth': [np.asarray([19.3, 19.3, 19.3, 19.4]).mean()], # cm
                'discharge_time': [11.82], # s
                'meas_dist_along_flume': [20, 55, 90, 150, 185, 220],
                'bed_h_range_equil': [9.9, 11.8, 13.6, 15.2, 15.0, 10.0], # cm (left to right)
                'water_h_range_equil': [19.0, 20.5, 22.5, 24.5, 25.6, 28.2], # cm (left to right)
                'equil_mass_inds': [0,12],
                'slope_inds': [1,5]
                },

            'e4': { #Santi changed e2 to e4 on Feb 17, 2020
                'grain_kind': 'ng',
                'date': '21_10_17',
                'bed_slope': 33.0,#29.0, # per mille
                'main_tank_water_temp': 19, # C
                'main_tank_water_depth': 31.5, # cm
                'pump_freq': 31.8, # Hz
                'pipe_grade': 210, # grade
                'e_start_time': '17:11:30', # time
                'PIV_start_time': '', # time started at the end of box 6
                'e_end_time': '', # time
                'dt_equil': [120, 120, 120, 120, 120, 120, 120, 120, 120, 125, 115, 120], # s
                'bead_mass': [673.52, 667.04, 709.67, 730.54, np.nan, 699.89, 745.20, 742.79, 736.48 , 778.16, 699.34, 745.26], # grams
                'discharge_depth': [np.asarray([19.3, 19.3, 19.3, 19.4]).mean()], # cm
                'discharge_time': [11.82], # s
                'meas_dist_along_flume': [20, 55, 90, 150, 185, 220],
                'bed_h_range_equil': [10.6, 13.2, 15.5, 18.8, 19.5, 16.6], # cm (left to right)
                'water_h_range_equil': [18.9, 21.1, 23.4, 26.7, 27.9, 32.2], # cm (left to right)
                'equil_mass_inds': [0,12],
                'slope_inds': [1,5]
                },

            'e1': { #Santi changed e3 to e1 on Feb 17, 2020
                'grain_kind': 'ng',
                'date': '22_10_17',
                'bed_slope': 33.0,#29.5, # per mille
                'main_tank_water_temp': 20, # C
                'main_tank_water_depth': 33.9, # cm
                'pump_freq': 31.6, # Hz
                'pipe_grade': 1.0, # grade
                'e_start_time': '12:39:55', # time
                'PIV_start_time': '13:02:00', # time started at the end of box 6
                'e_end_time': '', # time
                'dt_equil': [240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240], # s
                'bead_mass': [168.93, 120.25, 155.06, 140.88, 147.01, 180.88, 204.42, 143.72, 147.52, 168.63, 183.16, 159.48, 159.56, 181.90, 152.73], # grams
                'discharge_depth': [np.asarray([22.3, 22.3, 22.3, 22.3]).mean(), np.asarray([18.9, 18.9, 19.0, 19.0]).mean()], # cm
                'discharge_time': [13.34, 11.81], # s
                'meas_dist_along_flume': [20, 55, 90, 150, 185, 220],
                'bed_h_range_equil': [9.2, 10.5, 11.6, 12.0, 11.8, 10.0], # cm (left to right)
                'water_h_range_equil': [19.6, 20.6, 21.8, 22.3, 23.2, 24.8], # cm (left to right)
                'equil_mass_inds': [0,15],
                'slope_inds': [1,5]
                },

            'e2': { #Santi changed e4 to e2 on Feb 17, 2020
                'grain_kind': 'ng',
                'date': '22_10_17',
                'bed_slope': 33.0,#29.7, # per mille
                'main_tank_water_temp': 20, # C
                'main_tank_water_depth': 33.5, # cm
                'pump_freq': 31.6, # Hz
                'pipe_grade': -16.0, # grade
                'e_start_time': '15:33:00', # time
                'PIV_start_time': '16:11:30', # time started at the end of box 6
                'e_end_time': '', # time
                'dt_equil': [300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300], # s
                'bead_mass': [150.70, 185.88, 145.67, 245.26, 246.73,  182.61, 190.14, 209.32, 183.31, 217.85,  195.83], # grams
                'discharge_depth': [np.nan], # cm
                'discharge_time': [np.nan], # s
                'meas_dist_along_flume': [20, 55, 90, 150, 185, 220],
                'bed_h_range_equil': [9.2, 10.5, 11.6, 12.0, 11.8, 10.0], # cm (left to right)
                'water_h_range_equil': [19.6, 20.6, 21.8, 22.3, 23.2, 24.8], # cm (left to right)
                'equil_mass_inds': [0,11],
                'slope_inds': [1,5]
                },

            'e5': {
                'grain_kind': 'ng',
                'date': '23_10_17',
                'bed_slope': 33.0,#29.5, # per mille
                'main_tank_water_temp': 20, # C
                'main_tank_water_depth': 32.1, # cm
                'pump_freq': 31.8, # Hz
                'pipe_grade': 364.0, # grade
                'e_start_time': '12:47:00', # time
                'PIV_start_time': '', # time started at the end of box 6
                'e_end_time': '', # time
                'dt_equil': [60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60], # s
                'bead_mass': [769.17, 796.82, 814.56, 826.16, 835.55, 816.20, 819.74, 843.58, 844.30, 857.64, 879.36, 867.78, 885.15, 889.37, 869.69, 802.95, 730.86, 741.03, 757.13, 746.17], # grams
                'discharge_depth': [19.0, 19.0, 19.0, 19.0], # cm
                'discharge_time': [11.69], # s
                'meas_dist_along_flume': [20, 55, 90, 150, 185, 220],
                'bed_h_range_equil': [np.nan, 14.8, 18.5, 22.6, np.nan, np.nan], # cm (left to right)
                'water_h_range_equil': [np.nan, 21.6, 25.5, 29.7, np.nan, np.nan], # cm (left to right)
                'equil_mass_inds': [3,16],
                'slope_inds': [1,4]
                }
            },

        'ng_s3': {

            'e3': { #Santi changed e1 to e3 on Feb 18, 2020
                'exp_name': 's3e16',
                'grain_kind': 'ng',
                'date': '29_10_2018',
                'bed_slope': 35.4,  # per mille
                'main_tank_water_temp': np.nan,  # C
                'main_tank_water_depth': 32.3,  # cm
                'pump_freq': 31.5,  # Hz
                'pipe_grade': 48.0,  # per mille
                'discharge_depth': [np.asarray([np.nan]).mean()],  # cm
                'discharge_time': [np.nan],  # s
                'feed_mass_flux': [46.37, 47.62, 46.56],  # g
                'feed_time': [30.0, 30.0, 30.0],  # s
                'cameras_pos': [200.0, 694.18],  # z, y (mm*4)
                'piv_pos': [1423.0, np.nan],  # z, y (mm*4)
                'ldv_y_pos': [980.0, 849.0, 780.0, 742.0, 722.0, 712.0, 706.0, 703.0, 701.0],  # (mm*4)
                'ldv_z_pos': [577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0],  # (mm*4)
                'dt_equil': [300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300],  # s
                'bead_mass': [500.74, 497.83, 478.76, 418.66, 483.00, 525.59, 536.33, 515.42, 490.87, 509.32, 511.97],  # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [8.7, 10.9, 12.1, 13.1, 13.6, np.nan],  # cm (left to right)
                'water_h_range_equil': [17.7, 20.4, 21.6, 22.4, 23.9, np.nan],  # cm (left to right)
                'equil_mass_inds': [0, 11],
                'slope_inds': [1, 5],
                'notes': 'tins 21-31'
                },

            'e2': {
                'exp_name': 's3e17',
                'grain_kind': 'ng',
                'date': '31_10_2018',
                'bed_slope': 35.4, # per mille
                'main_tank_water_temp': np.nan, # C
                'main_tank_water_depth': 32.3, # cm
                'pump_freq': 31.5, # Hz
                'pipe_grade': -15.5, # per mille
                'discharge_depth': [np.asarray([16.7, 16.9, 16.7, 16.8]).mean()], # cm
                'discharge_time': [10.86], # s
                'feed_mass_flux': [17.80, 16.13, 16.74, 17.12], # g
                'feed_time': [60.0, 60.0, 60.0, 60.0], # s
                'cameras_pos': [200.0, 624.86], # z, y (mm*4)
                'piv_pos': [1423.0, 710.52], # z, y (mm*4)
                'ldv_y_pos': [940.0, 788.0, 708.0, 666.0, 644.0, 632.0, 626.0, 623.0], # (mm*4)
                'ldv_z_pos': [577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0], # (mm*4)
                'dt_equil': [300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300], # s
                'bead_mass': [87.40, 111.55, 91.02, 75.19, 47.98, 66.31, 76.80, 90.65, 101.18, 61.00, 76.31, 138.10, 77.07, 64.66, 69.95, 60.07], # grams
                'meas_dist_along_flume': [np.nan],
                'bed_h_range_equil': [np.nan], # cm (left to right)
                'water_h_range_equil': [np.nan], # cm (left to right)
                'equil_mass_inds': [0, 16],
                'slope_inds': [1, 5],
                'notes': 'tins 1-16'
                },

            # This experiment has been commented out because we have series doubts about whether steady state was ever achieved. The mass flux out we measured was also problematic. We have decided not to use it at all.
            # 'e1': { #Santi changed e3 to e1 on Feb 18, 2020
            #         'exp_name': 's3e18',
            #         'grain_kind': 'ng',
            #         'date': '31_10_2018',
            #         'bed_slope': 35.4, # per mille
            #         'main_tank_water_temp': np.nan, # C
            #         'main_tank_water_depth': 31.6, # cm
            #         'pump_freq': 31.5, # Hz
            #         'pipe_grade': -25.0, # per mille
            #         'discharge_depth': [np.asarray([19.4, 19.3, 19.3, 19.4]).mean()], # cm
            #         'discharge_time': [12.25], # s
            #         'feed_mass_flux': [6.41, 6.36, 7.29], # g
            #         'feed_time': [80.0, 80.0, 80.0], # s
            #         'cameras_pos': [200.0, np.nan], # z, y (mm*4)
            #         'piv_pos': [1423.0, np.nan], # z, y (mm*4)
            #         'ldv_y_pos': [np.nan], # (mm*4)
            #         'ldv_z_pos': [577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0], # (mm*4)
            #         'dt_equil': [300, 300, 300], # s Original data, but grains jammed, and last bin was garbage
            #         'bead_mass': [23.61, 18.83, 11.51], # grams
            #         'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
            #         'bed_h_range_equil': [np.nan, 9.8, 10.6, 11.4, 11.4, 11.7], # cm (left to right)
            #         'water_h_range_equil': [np.nan, 20.0, 21.1, 21.2, 21.9, 22.9], # cm (left to right)
            #         'equil_mass_inds': [0, 1],
            #         'slope_inds': [1, 5],
            #         'notes': 'tins for eeriment: 16-19, tin 19 was corrupted by problems with the feed rate, then the eeriment ended earlys'
            # },
            },

        'ng_s4': {
            'e1': {
                'exp_name': 'ng_s4_e1',
                'grain_kind': 'ng',
                'date': '05_02_2019',
                'bed_slope': 35.4,  # per mille
                'main_tank_water_temp': np.nan,  # C
                'main_tank_water_depth': 33.0,  # cm
                'pump_freq': 31.5,  # Hz
                'pipe_grade': -15.0,  # per mille
                'discharge_depth': [np.asarray([15.7, 15.6, 15.7, 15.7]).mean()],  # cm
                'discharge_time': [9.45],  # s
                'feed_mass_flux': [25.46, 30.09, 31.68, 32.30], # g
                'feed_time': [90.0, 90.0, 90.0, 90.0],  # s
                'cameras_pos': [200.0, 602.00],  # z, y (mm*4)
                'piv_pos': [1423.0, np.nan],  # z, y (mm*4)
                'ldv_y_pos': [901.0, 820.0, 760.0, 685.0, 645.0, 624.0, 613.0, 607.0, 602.0],  # (mm*4)
                'ldv_z_pos': [577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0],  # (mm*4)
                'ldv_bed': 600,
                'dt_equil': [600, 600, 600, 600, 600],  # s
                'bead_mass': [127.82, 157.57, 179.51, 179.70, 166.96],  # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [9.0, 9.9, 11.0, 11.4, 10.8, np.nan],  # cm (left to right)
                'water_h_range_equil': [18.8, 20.5, 21.2, 21.4, 22.3, np.nan],  # cm (left to right)
                'equil_mass_inds': [0, 5],
                'slope_inds': [1, 5],
                'notes': 'Tins 14-18. Extra grains in box 37'
                },

            'e2': {
                'exp_name': 'ng_s4_e2',
                'grain_kind': 'ng',
                'date': '07_02_2019',
                'bed_slope': 35.4,  # per mille
                'main_tank_water_temp': np.nan,  # C
                'main_tank_water_depth': 33.2,  # cm
                'pump_freq': 31.5,  # Hz
                'pipe_grade': 17.1,  # per mille
                'discharge_depth': [np.asarray([14.7, 14.7, 14.8, 14.8]).mean()],  # cm
                'discharge_time': [8.97],  # s
                'feed_mass_flux': [42.95, 42.44, 42.70, 41.75], # g
                'feed_time': [45.0, 45.0, 45.0, 45.0],  # s
                'cameras_pos': [200.0, 579.43],  # z, y (mm*4)
                'piv_pos': [1423.0, 731.27],  # z, y (mm*4)
                'ldv_y_pos': [940.0, 850.0, 799.0, 724.0, 685.0, 664.0, 653.0, 647.0, 644.0, 642.0],  # (mm*4)
                'ldv_z_pos': [577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0],  # (mm*4)
                'ldv_bed': 640.0,
                'dt_equil': [600, 600, 600],  # s
                'bead_mass': [505.64, 553.06, 581.75],  # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [9.0, 10.3, 11.5, 12.4, 12.3, np.nan],  # cm (left to right)
                'water_h_range_equil': [18.8, 20.2, 21.1, 21.9, 22.9, np.nan],  # cm (left to right)
                'equil_mass_inds': [0, 3],
                'slope_inds': [1, 5],
                'notes': 'Tins 1-3'
                },
            },

        'oc_s3': {
            'e1': {
                'exp_name': 's3e14',
                'grain_kind': 'oc',
                'date': '25_10_2018',
                'bed_slope': 35.4,  # per mille
                'main_tank_water_temp': np.nan,  # C
                'main_tank_water_depth': np.nan,  # cm
                'pump_freq': 31.5,  # Hz
                'pipe_grade': 18.1,  # per mille
                'discharge_depth': [np.asarray([np.nan]).mean()],  # cm
                'discharge_time': [np.nan],  # s
                'feed_mass_flux': [44.73, 44.47, 44.08, 44.30],  # g
                'feed_time': [30.0, 30.0, 30.0, 30.0],  # s
                'cameras_pos': [200.0, 489.58],  # z, y (mm*4)
                'piv_pos': [1423.0, 513.60],  # z, y (mm*4)
                'ldv_y_pos': [np.nan],  # (mm*4)
                'ldv_z_pos': [np.nan],  # (mm*4)
                'dt_equil': [600, 600, 305, 300],  # s
                'bead_mass': [837.79, 932.85, 476.75, 436.59],  # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [np.nan, 6.2, 7.5, 7.9, 8.1, np.nan],  # cm (left to right)
                'water_h_range_equil': [np.nan, 16.2, 17.4, 17.9, 18.9, np.nan],  # cm (left to right)
                'equil_mass_inds': [0, 4],
                'slope_inds': [1, 5],
                'notes': ''
                },

            'e2': {
                'exp_name': 's3e15',
                'grain_kind': 'oc',
                'date': '29_10_2018',
                'bed_slope': 35.4,   # per mille
                'main_tank_water_temp': np.nan,   # C
                'main_tank_water_depth': 33.0,  # cm
                'pump_freq': 31.5,  # Hz
                'pipe_grade': -20.0,  # per mille
                'discharge_depth': [np.asarray([np.nan]).mean()],  # cm
                'discharge_time': [np.nan],  # s
                'feed_mass_flux': [7.64, 7.84, 5.48],  # g
                'feed_time': [30.0, 30.0, 30.0],  # s
                'cameras_pos': [200.0, 462.38],  # z, y (mm*4)
                'piv_pos': [np.nan, np.nan],  # z, y (mm*4)
                'ldv_y_pos': [760.3, 626.0, 546.0, 500.0, 472.0, 456.0, 446.0, 440.0, 436.0],  # (mm*4)
                'ldv_z_pos': [577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0],  # (mm*4)
                'dt_equil': [180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180],  # s
                'bead_mass': [70.20, 68.23, 78.05, 59.76, 58.25, 60.61, 56.15, 63.20, 55.65, 55.53, 56.90, 64.85, 49.06, 51.95, 61.35, 60.28, 51.62, 67.82, 59.08, 67.21],  # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [np.nan, 5.6, 6.2, 6.8, 6.3, np.nan],  # cm (left to right)
                'water_h_range_equil': [np.nan, 16.6, 17.0, 17.3, 18.0, np.nan],  # cm (left to right)
                'equil_mass_inds': [0, 20],
                'slope_inds': [1, 5],
                'notes': ''
                },

            'e3': {
                'exp_name': 's3e19',
                'grain_kind': 'oc',
                'date': '1_11_2018',
                'bed_slope': 35.4, # per mille
                'main_tank_water_temp': np.nan, # C
                'main_tank_water_depth': 31.8, # cm
                'pump_freq': 31.5, # Hz
                'pipe_grade': 30.3, # per mille
                'discharge_depth': [np.asarray([19.8, 19.9, 19.8, 19.8]).mean()], # cm
                'discharge_time': [12.70], # s
                'feed_mass_flux': [96.65, 97.15, 99.74], # g
                'feed_time': [30.0, 30.0, 30.0], # s
                'cameras_pos': [200.0, np.nan], # z, y (mm*4)
                'piv_pos': [1423.0, np.nan], # z, y (mm*4)
                'ldv_y_pos': [np.nan], # (mm*4)
                'ldv_z_pos': [np.nan], # (mm*4)
                'dt_equil': [120, 120, 120, 120, 120, 120, 120, 120, 120], # s
                'bead_mass': [207.43, 269.27, 289.48, 318.79, 356.24, 378.19, 412.40, 356.04, 368.19], # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [np.nan, 7.0, 9.4, 10.0, 10.8, np.nan], # cm (left to right)
                'water_h_range_equil': [np.nan, 16.1, 18.1, 18.9, 20.5, np.nan], # cm (left to right)
                'equil_mass_inds': [0, 9],
                'slope_inds': [1, 5],
                'notes': ''
                },
            },

        'oc_s4': {

            'e1': {
                'exp_name': 'oc_s4_e1',
                'grain_kind': 'oc',
                'date': '02_02_2019',
                'bed_slope': 35.4,  # per mille
                'main_tank_water_temp': np.nan,  # C
                'main_tank_water_depth': 34.0,  # cm
                'pump_freq': 31.5,  # Hz
                'pipe_grade': 174.0,  # per mille
                'discharge_depth': [np.asarray([16.0, 16.0, 16.0, 16.0]).mean()],  # cm
                'discharge_time': [9.86],  # s
                'feed_mass_flux': [178.58, 181.64, 178.10, 181.55],  # g
                'feed_time': [15.0, 15.0, 15.0, 15.0],  # s
                'cameras_pos': [200.0, np.nan],  # z, y (mm*4)
                'piv_pos': [1423.0, np.nan],  # z, y (mm*4)
                'ldv_y_pos': [1164.0, 1121.0, 1035.0],  # (mm*4)
                'ldv_z_pos': [577.0, 577.0, 577.0],  # (mm*4)
                'dt_equil': [120.0, 120.0, 120.0, 120.0, 120.0, 120.0, 120.0, 120.0],  # s
                'bead_mass': [1379.37, 1435.78, np.nan, 1419.98, 1436.61, 1486.70, 1477.91, 1492.10],  # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [9.7, 13.4, 16.6, 19.5, 21.4, np.nan],  # cm (left to right)
                'water_h_range_equil': [17.6, 20.8, 24.0, 26.7, 30.0, np.nan],  # cm (left to right)
                'equil_mass_inds': [0, 8],
                'slope_inds': [1, 5],
                'notes': 'box 3 dropped by accident, and can not be used'
                },

            'e2': {
                'exp_name': 'oc_s4_e2',
                'grain_kind': 'oc',
                'date': '04_02_2019',
                'bed_slope': 35.4,  # per mille
                'main_tank_water_temp': np.nan,  # C
                'main_tank_water_depth': 32.5,  # cm
                'pump_freq': 31.5,  # Hz
                'pipe_grade': -4.3,  # per mille
                'discharge_depth': [np.asarray([18.8, 18.8, 18.9, 18.8]).mean()],  # cm
                'discharge_time': [11.38],  # s
                'feed_mass_flux': [35.29,  34.41,  31.24,  34.22],  # g
                'feed_time': [45.0, 45.0, 45.0, 45.0],  # s
                'cameras_pos': [200.0, 569.41],  # z, y (mm*4)
                'piv_pos': [1423.0, np.nan],  # z, y (mm*4)
                'ldv_y_pos': [916.0, 830.0, 780.0, 704.0, 661.0, 637.0, 623.0, 615.0, 611.0],  # (mm*4)
                'ldv_z_pos': [574.0, 574.0, 574.0, 574.0, 574.0, 574.0, 574.0, 574.0, 574.0],  # (mm*4)
                'dt_equil': [600, 600, 600, 600],  # s
                'bead_mass': [503.30, 498.46, 517.40, 514.79],  # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [8.8, 9.7, 11.1, 11.5, 10.9, np.nan],  # cm (left to right)
                'water_h_range_equil': [19.0, 20.2, 21.2, 21.5, 22.5, np.nan],  # cm (left to right)
                'equil_mass_inds': [0, 4],
                'slope_inds': [1, 4],
                'notes': 'h_min = 609. Tins 9-12'
                },

            'e3': {
                'exp_name': 'oc_s4_e3',
                'grain_kind': 'oc',
                'date': '04_02_2019',
                'bed_slope': 35.4,  # per mille
                'main_tank_water_temp': np.nan,  # C
                'main_tank_water_depth': 31.5,  # cm
                'pump_freq': 31.5,  # Hz
                'pipe_grade': 80.0,  # per mille
                'discharge_depth': [np.asarray([18.9, 18.8, 18.9, 18.9]).mean()],  # cm
                'discharge_time': [11.47],  # s
                'feed_mass_flux': [155.21, 153.12, 153.83, 152.63],  # g
                'feed_time': [30.0, 30.0, 30.0, 30.0],  # s
                'cameras_pos': [200.0, np.nan],  # z, y (mm*4)
                'piv_pos': [1423.0, np.nan],  # z, y (mm*4)
                'ldv_y_pos': [1035.0, 917.0, 856.0, 826.0, 811.0, 799.0],  # (mm*4)
                'ldv_z_pos': [574.0,  574.0, 574.0, 574.0, 574.0, 574.0],  # (mm*4)
                'dt_equil': [240, 240, 240, 240, 240, 240, 240],  # s
                'bead_mass': [1228.15, 1218.39, 1254.10, 1207.23, 1245.53, 1193.64, 1229.51],  # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [9.6, 11.8, 14.2, 15.6, 16.4, np.nan],  # cm (left to right)
                'water_h_range_equil': [17.6, 20.3, 22.3, 23.9, 26.0, np.nan],  # cm (left to right)
                'equil_mass_inds': [0, 7],
                'slope_inds': [1, 5],
                'notes': 'tins 13-19'
                },

            'e4': {
                'exp_name': 'oc_s4_e4',
                'grain_kind': 'oc',
                'date': '05_02_2019',
                'bed_slope': 35.4,  # per mille
                'main_tank_water_temp': np.nan,  # C
                'main_tank_water_depth': 34.0,  # cm
                'pump_freq': 31.5,  # Hz
                'pipe_grade': 127.0,  # per mille
                'discharge_depth': [np.asarray([16.5, 16.5, 16.4, 16.5]).mean()],  # cm
                'discharge_time': [9.94],  # s
                'feed_mass_flux': [127.18, 127.82, 128.22, 126.64],  # g
                'feed_time': [15.0, 15.0, 15.0, 15.0],  # s
                'cameras_pos': [200.0, 772.60],  # z, y (mm*4)
                'piv_pos': [1423.0, np.nan],  # z, y (mm*4)
                'ldv_y_pos': [1090.0, 1007.0, 964.0, 941.0, 929.0, 923.0, 920.0, 918.0],  # (mm*4)
                'ldv_z_pos': [577.0,  577.0,  577.0, 577.0, 577.0, 577.0, 577.0, 577.0],  # (mm*4)
                'dt_equil': [180, 180, 180, 180, 180, 180, 180, 180],  # s
                'bead_mass': [1504.84, 1597.49, 1591.37, 1578.78, 1632.69, 1599.31, 1573.43, 1562.14],  # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [9.9, 12.5, 15.5, 17.9, 19.3, np.nan],  # cm (left to right)
                'water_h_range_equil': [17.4, 20.1, 23.0, 25.4, 27.8, np.nan],  # cm (left to right)
                'equil_mass_inds': [0, 8],
                'slope_inds': [1, 5],
                'notes': 'Beads were all quite hot going into the flume. Bottom of lda is 916.0. Tins 1-8'
                },
            },

        'ls_s4': {

            'e1': {
                'exp_name': 'ls_s4_e1',
                'grain_kind': 'ls',
                'date': '03_02_2019',
                'bed_slope': 35.4,  # per mille
                'main_tank_water_temp': np.nan,  # C
                'main_tank_water_depth': 33.3,  # cm
                'pump_freq': 31.5,  # Hz
                'pipe_grade': 61.5,  # per mille
                'discharge_depth': [np.asarray([16.5, 16.6, 16.6, 16.7]).mean()],  # cm
                'discharge_time': [9.79],  # s
                'feed_mass_flux': [90.63,  93.06,  92.03,  91.97],  # g
                'feed_time': [30.0, 30.0, 30.0, 30.0],  # s
                'cameras_pos': [200.0, 577.76],  # z, y (mm*4)
                'piv_pos': [1423.0, np.nan],  # z, y (mm*4)
                'ldv_y_pos': [927.0, 850.0, 770.0, 699.0, 668.0, 654.0, 648.0],  # (mm*4)
                'ldv_z_pos': [572.0, 572.0, 572.0, 572.0, 572.0, 572.0, 572.0],  # (mm*4)
                'dt_equil': [300, 300, 300, 300, 300, 300],  # s
                'bead_mass': [822.91, 850.59, 821.56, 845.60, 842.77, 831.87],  # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [8.6, 9.9, 11.1, 12.1, 11.8, np.nan],  # cm (left to right)
                'water_h_range_equil': [18.0, 19.8, 20.7, 21.5, 22.5, np.nan],  # cm (left to right)
                'equil_mass_inds': [0, 6],
                'slope_inds': [1, 5],
                'notes': 'tins 10 - 15'
                },

            'e2': {
                'exp_name': 'ls_s4_e2',
                'grain_kind': 'ls',
                'date': '03_02_2019',
                'bed_slope': 35.4,  # per mille
                'main_tank_water_temp': np.nan,  # C
                'main_tank_water_depth': 33.3,  # cm
                'pump_freq': 31.5,  # Hz
                'pipe_grade': 10.0,  # per mille
                'discharge_depth': [np.asarray([16.3, 16.3, 16.3, 16.3]).mean()],  # cm
                'discharge_time': [9.67],  # s
                'feed_mass_flux': [45.76,  46.82,  45.86,  45.33],  # g
                'feed_time': [45.0, 45.0, 45.0, 45.0],  # s
                'cameras_pos': [200.0, 519.17],  # z, y (mm*4)
                'piv_pos': [1423.0, 744.52],  # z, y (mm*4)
                'ldv_y_pos': [888.0, 800.0, 727.0, 643.0, 598.0, 575.0, 563.0, 554.0],  # (mm*4)
                'ldv_z_pos': [572.0, 572.0, 572.0, 572.0, 572.0, 572.0, 572.0, 572.0],  # (mm*4)
                'dt_equil': [600, 600, 600, 600, 300],  # s
                'bead_mass': [548.72, 551.83, 567.07, 580.99, 296.25],  # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [8.8, 9.3, 9.9, 10.0, 9.5, np.nan],  # cm (left to right)
                'water_h_range_equil': [19.1, 19.9, 20.6, 20.5, 20.9, np.nan],  # cm (left to right)
                'equil_mass_inds': [0, 5],
                'slope_inds': [1, 5],
                'notes': 'During box three, the feeder jammed. We were able to unjam it, and restarted the experiment with box 4. Tins 16,17,19,20,21'
                },

            'e3': {
                'exp_name': 'ls_s4_e3',
                'grain_kind': 'ls',
                'date': '04_02_2019',
                'bed_slope': 35.4,  # per mille
                'main_tank_water_temp': np.nan,  # C
                'main_tank_water_depth': 33.0,  # cm
                'pump_freq': 31.5,  # Hz
                'pipe_grade': 143.7,  # per mille
                'discharge_depth': [np.asarray([18.2, 18.2, 18.2, 18.2]).mean()],  # cm
                'discharge_time': [11.32],  # s
                'feed_mass_flux': [86.98, 86.67, 87.30, 88.20],  # g
                'feed_time': [15.0, 15.0, 15.0, 15.0],  # s
                'cameras_pos': [200.0, 631.01],  # z, y (mm*4)
                'piv_pos': [1423.0, 765.32],  # z, y (mm*4)
                'ldv_y_pos': [998.0, 900.0, 860.0, 797.0, 769.0],  # (mm*4)
                'ldv_z_pos': [575.0, 575.0, 575.0, 575.0, 575.0],  # (mm*4)
                'dt_equil': [240, 240, 240, 240, 240, 240, 265, 215],  # s
                'bead_mass': [1054.78, 1185.07, 1238.75, 1275.54, 1263.85, 1273.66, 1428.67, 1189.05],  # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [9.0, 11.3, 13.3, 15.0, 15.5, np.nan],  # cm (left to right)
                'water_h_range_equil': [17.3, 20.0, 21.7, 23.2, 24.8, np.nan],  # cm (left to right)
                'equil_mass_inds': [0, 8],
                'slope_inds': [1, 5],
                'notes': 'h_min = 750. Strange noises in feeder began during box 6. Tins 1-8'
                },

            'e4': {
                'exp_name': 'ls_s4_e4',
                'grain_kind': 'ls',
                'date': '05_02_2019',
                'bed_slope': 35.4,  # per mille
                'main_tank_water_temp': np.nan,  # C
                'main_tank_water_depth': 32.5,  # cm
                'pump_freq': 31.5,  # Hz
                'pipe_grade': -12.0,  # per mille
                'discharge_depth': [np.asarray([17.6, 17.6, 17.7, 17.6]).mean()],  # cm
                'discharge_time': [10.51],  # s
                'feed_mass_flux': [17.39, 18.62, 18.02, 18.07],  # g
                'feed_time': [45.0, 45.0, 45.0, 45.0],  # s
                'cameras_pos': [200.0, 505.16],  # z, y (mm*4)
                'piv_pos': [1423.0, np.nan],  # z, y (mm*4)
                'ldv_y_pos': [875.0, 707.0, 650.0, 615.0, 563.0, 519.0, 511.0, 506.0, 503.0, 502.0],  # (mm*4)
                'ldv_z_pos': [577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0],  # (mm*4)
                'dt_equil': [600, 600, 600, 600, 600, 600],  # s
                'bead_mass': [149.77, 222.41, 231.48, 228.64, 246.25, 220.24],  # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [8.1, 8.4, 9.0, 8.9, 8.0, np.nan],  # cm (left to right)
                'water_h_range_equil': [19.6, 20.2, 20.5, 20.5, 20.8, np.nan],  # cm (left to right)
                'equil_mass_inds': [0, 6],
                'slope_inds': [1, 5],
                'notes': 'bed at 500.0. Tins 9 - 14.'
                },

            'e5': {
                'exp_name': 'ls_s4_e5',
                'grain_kind': 'ls',
                'date': '05_02_2019',
                'bed_slope': 35.4,  # per mille
                'main_tank_water_temp': np.nan,  # C
                'main_tank_water_depth': 32.1,  # cm
                'pump_freq': 31.5,  # Hz
                'pipe_grade': 35.0,  # per mille
                'discharge_depth': [np.asarray([18.5, 18.5, 18.6, 18.5]).mean()],  # cm
                'discharge_time': [11.00],  # s
                'feed_mass_flux': [57.08, 57.18, 56.70, 56.60],  # g
                'feed_time': [30.0, 30.0, 30.0, 30.0],  # s
                'cameras_pos': [200.0, 604.0],  # z, y (mm*4)
                'piv_pos': [1423.0, np.nan],  # z, y (mm*4)
                'ldv_y_pos': [910.0, 810.0, 764.0, 687.0, 646.0, 624.0, 613.0, 607.0, 604.0],  # (mm*4)
                'ldv_z_pos': [577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0],  # (mm*4)
                'dt_equil': [600, 600, 600],  # s
                'bead_mass': [1121.84, 1111.40, 1130.18],  # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [8.6, 9.7, 10.8, 11.0, 11.0, np.nan],  # cm (left to right)
                'water_h_range_equil': [18.6, 20.3, 20.9, 21.1, 22.1, np.nan],  # cm (left to right)
                'equil_mass_inds': [0, 3],
                'slope_inds': [1, 5],
                'notes': 'lda bed at 600. Tins 15-17'
                },

            'e6': {
                'exp_name': 'ls_s4_e6',
                'grain_kind': 'ls',
                'date': '06_02_2019',
                'bed_slope': 35.4,  # per mille
                'main_tank_water_temp': np.nan,  # C
                'main_tank_water_depth': 33.6,  # cm
                'pump_freq': 31.5,  # Hz
                'pipe_grade': 113.0,  # per mille
                'discharge_depth': [np.asarray([17.7, 17.7, 17.7, 17.7]).mean()],  # cm
                'discharge_time': [10.63],  # s
                'feed_mass_flux': [63.03, 62.18, 64.23, 62.50],  # g
                'feed_time': [15.0, 15.0, 15.0, 15.0],  # s
                'cameras_pos': [200.0, np.nan],  # z, y (mm*4)
                'piv_pos': [1423.0, np.nan],  # z, y (mm*4)
                'ldv_y_pos': [975.0, 925.0, 875.0, 800.0, 740.0, 719.0, 709.0, 704.0],  # (mm*4)
                'ldv_z_pos': [577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0],  # (mm*4)
                'ldv_bed': 700.0,
                'dt_equil': [300, 300, 300, 300, 300, 300],  # s
                'bead_mass': [1130.88, 1189.42, 1235.63, 1269.98, 1261.51, 1258.11],  # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [9.1, 11.0, 12.3, 13.6, 14.2, np.nan],  # cm (left to right)
                'water_h_range_equil': [17.5, 20.0, 21.8, 22.7, 24.0, np.nan],  # cm (left to right)
                'equil_mass_inds': [0, 6],
                'slope_inds': [1, 5],
                'notes': 'Tins 8-13'
                },
            },

        'gg_s4': {

            'e1': {
                'exp_name': 'gg_s4_e1',
                'grain_kind': 'gg',
                'date': '05_02_2019',
                'bed_slope': 35.4,  # per mille
                'main_tank_water_temp': np.nan,  # C
                'main_tank_water_depth': 32.5,  # cm
                'pump_freq': 31.5,  # Hz
                'pipe_grade': 60.0,  # per mille
                'discharge_depth': [np.asarray([18.4, 18.4, 18.4, 18.4]).mean()],  # cm
                'discharge_time': [11.10],  # s
                'feed_mass_flux': [74.96, 77.94, 74.38, 75.14],  # g
                'feed_time': [15.0, 15.0, 15.0, 15.0],  # s
                'cameras_pos': [200.0, 704.53],  # z, y (mm*4)
                'piv_pos': [1423.0, np.nan],  # z, y (mm*4)
                'ldv_y_pos': [1065.0, 1000.0, 938.0, 879.0, 853.0, 840.0, 835.0, 832.0, 831.0],  # (mm*4)
                'ldv_z_pos': [577.0,  577.0,  577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0],  # (mm*4)
                'ldv_bed': 830.0,
                'dt_equil': [300, 300, 300, 300, 300],  # s
                'bead_mass': [1425.11, 1498.74, 1480.82, 1529.85, 1484.06],  # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [9.5, 11.8, 14.2, 16.4, 17.2, np.nan],  # cm (left to right)
                'water_h_range_equil': [17.5, 20.3, 22.7, 24.5, 26.5, np.nan],  # cm (left to right)
                'equil_mass_inds': [0, 5],
                'slope_inds': [1, 5],
                'notes': 'lda bed: 830. '
                },

            'e2': {
                'exp_name': 'gg_s4_e2',
                'grain_kind': 'gg',
                'date': '06_02_2019',
                'bed_slope': 35.4,  # per mille
                'main_tank_water_temp': np.nan,  # C
                'main_tank_water_depth': 34.0,  # cm
                'pump_freq': 31.5,  # Hz
                'pipe_grade': 109.5,  # per mille
                'discharge_depth': [np.asarray([15.4, 15.3, 15.4, 15.4]).mean()],  # cm
                'discharge_time': [8.92],  # s
                'feed_mass_flux': [162.67, 158.48, 160.92, 156.99],  # g
                'feed_time': [15.0, 15.0, 15.0, 15.0],  # s
                'cameras_pos': [200.0, np.nan],  # z, y (mm*4)
                'piv_pos': [1423.0, np.nan],  # z, y (mm*4)
                'ldv_y_pos': [np.nan],  # (mm*4)
                'ldv_z_pos': [np.nan],  # (mm*4)
                'ldv_bed': np.nan,
                'dt_equil': [120, 120, 120, 120],  # s
                'bead_mass': [1150.52, 1213.45, 1252.28, 1235.42],  # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [9.7, 13.0, 16.3, 18.8, 20.8, np.nan],  # cm (left to right)
                'water_h_range_equil': [17.4, 20.9, 23.8, 26.7, 29.2, np.nan],  # cm (left to right)
                'equil_mass_inds': [0, 4],
                'slope_inds': [1, 5],
                'notes': 'Tins 1-4'
                },

            'e3': {
                'exp_name': 'gg_s4_e3',
                'grain_kind': 'gg',
                'date': '06_02_2019',
                'bed_slope': 35.4,  # per mille
                'main_tank_water_temp': np.nan,  # C
                'main_tank_water_depth': 33.6,  # cm
                'pump_freq': 31.5,  # Hz
                'pipe_grade': 0.0,  # per mille
                'discharge_depth': [np.asarray([14.3, 14.3, 14.4, 14.4]).mean()],  # cm
                'discharge_time': [8.45],  # s
                'feed_mass_flux': [54.82, 52.57, 55.50],  # g
                'feed_time': [45.0, 45.0, 45.0],  # s
                'cameras_pos': [200.0, np.nan],  # z, y (mm*4)
                'piv_pos': [1423.0, np.nan],  # z, y (mm*4)
                'ldv_y_pos': [970.0, 880.0, 818.0, 750.0, 720.0, 706.0, 700.0, 696.0],  # (mm*4)
                'ldv_z_pos': [577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0],  # (mm*4)
                'ldv_bed': 695.0,
                'dt_equil': [600, 600, 600],  # s
                'bead_mass': [662.83, 680.56, 617.91],  # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [8.8, 10.7, 12.2, 13.1, 13.2, np.nan],  # cm (left to right)
                'water_h_range_equil': [18.0, 21.0, 22.5, 22.8, 24.2, np.nan],  # cm (left to right)
                'equil_mass_inds': [0, 3],
                'slope_inds': [1, 5],
                'notes': 'Tins 5-7'
                },

            'e4': {
                'exp_name': 'gg_s4_e4',
                'grain_kind': 'gg',
                'date': '07_02_2019',
                'bed_slope': 35.4,  # per mille
                'main_tank_water_temp': np.nan,  # C
                'main_tank_water_depth': 33.0,  # cm
                'pump_freq': 31.5,  # Hz
                'pipe_grade': -16.5,  # per mille
                'discharge_depth': [np.asarray([16.9, 16.9, 16.9, 16.8]).mean()],  # cm
                'discharge_time': [10.30],  # s
                'feed_mass_flux': [27.25, 27.63, 27.40, 28.43],  # g
                'feed_time': [60.0, 60.0, 60.0, 60.0],  # s
                'cameras_pos': [200.0, 573.21],  # z, y (mm*4)
                'piv_pos': [1423.0, 741.98],  # z, y (mm*4)
                'ldv_y_pos': [950.0, 870.0, 804.0, 727.0, 686.0, 664.0, 653.0, 647.0, 644.0, 642.0],  # (mm*4)
                'ldv_z_pos': [577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0],  # (mm*4)
                'ldv_bed': 640.0,
                'dt_equil': [600, 600, 600],  # s
                'bead_mass': [214.79, 276.74, 363.71],  # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [9.2, 10.5, 11.7, 12.2, 12.9, np.nan],  # cm (left to right)
                'water_h_range_equil': [18.3, 21.1, 21.8, 22.2, 23.0, np.nan],  # cm (left to right)
                'equil_mass_inds': [0, 3],
                'slope_inds': [1, 5],
                'notes': 'Tins 4-6'
                },

            'e5': {
                'exp_name': 'gg_s4_e5',
                'grain_kind': 'gg',
                'date': '07_02_2019',
                'bed_slope': 35.4,  # per mille
                'main_tank_water_temp': np.nan,  # C
                'main_tank_water_depth': 33.0,  # cm
                'pump_freq': 31.5,  # Hz
                'pipe_grade': 20.0,  # per mille
                'discharge_depth': [np.asarray([17.5, 17.6, 17.6, 17.6]).mean()],  # cm
                'discharge_time': [10.81],  # s
                'feed_mass_flux': [66.27, 66.85, 68.00, 70.00, 66.65, 67.26, 67.20],  # g
                'feed_time': [30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0],  # s
                'cameras_pos': [200.0, 635.16],  # z, y (mm*4)
                'piv_pos': [1423.0, 774.47],  # z, y (mm*4)
                'ldv_y_pos': [1000.0, 930.0, 870.0, 810.0, 767.0, 748.0, 737.0, 732.0, 728.0, 727.0],  # (mm*4)
                'ldv_z_pos': [577.0,  577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0, 577.0],  # (mm*4)
                'ldv_bed': 725.0,
                'dt_equil': [300, 300, 300, 300, 300],  # s
                'bead_mass': [651.08, 690.51, 679.40, 662.62, 682.85],  # grams
                'meas_dist_along_flume': [10.0, 50.0, 100.0, 150.0, 200.0, 240.0],
                'bed_h_range_equil': [9.1, 10.9, 12.8, 13.7, 14.2, np.nan],  # cm (left to right)
                'water_h_range_equil': [18.4, 20.8, 22.7, 22.9, 24.6, np.nan],  # cm (left to right)
                'equil_mass_inds': [0, 5],
                'slope_inds': [1, 5],
                'notes': 'Tins 7-11'
                }
            }
        }

json.dump(series_data, open("raw_exp_data.txt",'w'))